
 //Purpose: This file creates the Figures for Crimes Against Morality
 //First version: August 22, 2020; Gabriela Rubio
 //This version: September 21, 2020; Jennifer Seager
 *********************************************************************************
 ** CRIMES AGAINST MORALITY: UNINTENDED CONSEQUENCES OF CRIMINALIZING SEX WORK ***
 *********************************************************************************
 
 clear
 clear matrix
 estimates clear
 eststo clear
 cap log close
 set more off
 set mem 400m
 
 //Directory set in file #0
 
 ssc install grstyle
 ssc install cibar
 
 **********************************
 *** Figure II: Study Time Line ***
 **********************************
 
 import excel "$df/Timeline.xlsx", sheet("Sheet2") firstrow clear
 
 gen base=1 
 replace event=0.1 if event==5
 replace base=0.1 if base==1 
   
 grstyle init
 twoway (scatter event order, msymbol(pipe) msize(vlarge) mcolor(gs8)  plotregion(color(white))) (line base order, lpattern(solid) lwidth(medium) lcolor(gs8)), graphregion(color(white)) xtitle(" ")  ///
 ylabel(,labcolor(white) glcolor(white) notick)  xlabel("") legend(off)  xscale(lcolor(white)) yscale(lcolor(white)) ///
 text(0.02 14.7 "January-Feb                   September      Feb-March May-June September", size(tiny) color(black)) ///
 text(-0.02 7.5 "Feb-March", size(tiny) color(black)) ///
 text(0.02 74 "October", size(tiny) color(black)) ///
 text(0.17 4.6 "Census", size(tiny) color(black)) ///
 text(0.21 7.1 "Baseline", size(tiny) color(black)) ///
 text(0.21 12.8 "Census", size(tiny) color(black)) ///
 text(0.17 12.8 "STI Tests", size(tiny) color(black)) /// 
 text(0.39 15 "{bf:Criminalization}", size(vsmall) color(black)) ///
 text(0.17 18.4 "Census", size(tiny) color(black)) ///
 text(0.17 21.7 "Endline", size(tiny) color(black)) ///
 text(0.17 25.7 "STI Tests", size(tiny) color(black)) ///
 text(0.17 74 "Census", size(tiny) color(black)) ///
 text(-0.12 9 "{bf:2014}", size(vsmall) color(black)) ///
 text(-0.12 24 "{bf:2015}", size(vsmall) color(black)) ///
 text(-0.12 74 "{bf:2019}", size(vsmall) color(black)) ///
 text(0.107 1.1 "<", size(vsmall) color(gs8)) ///
 text(0.107 75.9 ">", size(vsmall) color(gs8)) ///
 text(0.22 15.04 "|", size(medium) color(gs8)) ///
 text(0.17 15.04 "|", size(medium) color(gs8)) ///
 text(0.12 15.04 "|", size(medium) color(gs8)) ///
 text(0.07 15.04 "|", size(medium) color(gs8)) ///
 text(0.02 15.04 "|", size(medium) color(gs8)) ///
 text(-0.05 15.05 "November", size(tiny) color(black)) 
 *Note: small arrow under "criminalization" is added manually
 

 graph export "$dout/Fig_II_timeline.pdf", replace
 

 **********************************************************************
 *** Figure III: Impact of Criminalization on Sex Worker Population ***
 **********************************************************************

 import excel "$df/WorksiteFigures.xlsx", sheet("mar2014-oct2019")  firstrow clear

 twoway (connected Criminalized xaxis, ms(d) lcolor(black) lwidth(thin) mlcolor(black) mfcolor(black) msize(medsmall) ///
 xlabel(3 8 13 29  50 101 ) xscale(range(-3 43)) xlabel(3 "February/March"   19 "September"  41 "May/June" 92 "October", labsize(*0.6)) ///
 xmlabel(12.5 "{bf}July" 25 "{bf} November", labsize(*1.05) tlength(medlarge)) ///
 xtitle("{bf}                           2014                                2015                                                         2019             ", ///
 margin(small) size(small))  scheme(s1color) xline(25, lc(gs8) lpat(dash)) xline(12.5, lc(gs12) lwidth(thin))) ///
 (connected NonCriminalizedAll xaxis , ms(s) lcolor(black) lpat(shortdash) lwidth(thin) mlcolor(black) mfcolor(black) msize(medsmall) ///
 text(467 13 "Pre-criminalization", place(c) box justification(center) margin(l+2 t+4 b+5 r+2) bcolor(white) size(small)) ylabel(0 (50) 500)  ///
 text(470 60 "Post-criminalization", size(small)) yline(50 100 150 200 250 300 350 400, lcolor(gs15) lwidth(thin))  text(427.5 12.5 "{bf} Announcement", box margin("1.5 1.5 2 2") bcolor(white) place(c) size(vsmall)) ///
 legend(all rows(1) size(vsmall)) title("Worksite Population")) (connected NonCriminalizedFormal xaxis , ms(O) lcolor(gs6) lpat(shortdash) lwidth(thin) ///
 mlcolor(gs6) mfcolor(gs6) msize(medsmall) ylabel(0 "0" 50 "50" 100 "100" 150 "150" 200 "200" 250 "250" 300 "300" 350 "350" 400 "400", angle(0) labsize(small) glwidth(thin)) ///
 ymlabel(450 " " 500 " ", nolabels tlength(zero)))

 graph export "$dout/Fig_III_sexwork_population.pdf", replace
 
  **********************************************************************
 *** Figure IV: Comparisons of Trends in Outcomes in Malang with ***
 *** Pasuruan and Batu prior to Criminalization, SUSENAS 2010–2013,
 *** Females Aged 28–42***
 **********************************************************************

 *	***See Separate do file with Susenas Data analysis;
 
 **********************************************************************
 *** Figure V: Impact of Criminalization on Sex Worker Population ***
 **********************************************************************
 
 #delimit;  
 *1. Input data;
 
use "$da/Crimes-Against-Morality_Main_data-constructed.dta", clear;

 *2. Setting Macros;
 *2.1. Setting sample restrictions for DD;
 *2.1.1. For the FSW Data;
 local sw1 = "if sw==1&dataset==1&full==1";
	*still in sex work;
 local sw2 = "if panel_v3==1&dataset==1";
	*in the panel and still in sex work;
 local sw3 = "if panelsti_sept==1&dataset==1";
	*in the September STI panel.;
 local sw4 = "if wspanel==1&dataset==1";

 *2.1.2. For the FSW transaction data;
 local tsw1 = "if dataset==2&full==1";
 local tsw2 = "if panel_f==1 & dataset==2&full==1";

 *2.1.3. For the Client Data;
 local c1 = "if dataset==3";

 *2.1.4. For the Client transaction data;
 local tc1 = "if dataset==4";

 *2.2. Setting controls;
 local char = 
	"divwid unmarried edyrs age children sw_locyrs disc_factor risktol_nodl nodlr ";
 local tchar1 = "regular outsider clean handsome old rich";
 local tchar2 = "regular";
 local cchar = "divwid unmarried edyrs age disc_factor risktol";
 local tcchar = "regular clean attractive";

 *generating an individual fixed effect;



 *t-test for equality of means: Baseline vs Endline;
 *Non-criminalized:;
 reg sept_any el if dataset==1 & closing==0, r;
 *Criminalized:;
 reg sept_any el if dataset==1 & closing==1, r;

 *Figure:;
 
 *For DD p-value:;
 reg sept_any 	dd_cl el closing if dataset==1, cluster(wsid);
 boottest  dd_cl, reps (10000) bootcluster(wsid);

 set scheme s1mono;

 cibar sept_any if dataset==1, over1(el) over2(closing) ciopts(lcolor(black))
 bargap(3) graphopts(legend(order(1 "Baseline" 2 "Endline")) ylabel(0 "0" .1 ".1" .2 ".2" .3 ".3" .4 ".4" .5 ".5" .6 ".6" .7 ".7" .8 ".8" .9 ".9" 1 "1", angle(0)) 
 ymlabel(1.1 " " 1.2 " " 1.3 " ", nolabels tlength(zero))
 ytitle("") xlabel(1.515 "Non-Criminalized" 4.215 "Criminalized") 
 xscale(range(0 5.7))   text(1.14 1.4 "{it:p = 0.298}", orientation(horizontal)) 
 text(1.07 1.4 "{subscript:|}{superscript:__________________________}{subscript:|}", 
 orientation(horizontal)) text(.9 4.2 "{it:p = 0.029}", orientation(horizontal)) 
 text(.83 4.2 "{subscript:|}{superscript:__________________________}{subscript:|}", 
 orientation(horizontal))text(1.32 2.9 "{it:p = 0.038}", orientation(horizontal)) 
 text(1.25 2.9 "{subscript:|}{superscript:____________________________________________________________}{subscript:|}", 
 orientation(horizontal)) title("Test Positive, All Worksites"))  barcolor(gs12) baropts(color(gs7) fintensity(inten60));

 graph export "$dout/Fig_V_sti_prevalence.pdf", replace;


 *******************************************************
 *** Figure VI: Estimates of criminalization impacts ***
 *******************************************************
 #delimit;
 
 clear;
 clear matrix;
 estimates clear;
 eststo clear;
 cap log close;
 set more off;
 set mem 400m;


 *1. Input data;

use "$da/Crimes-Against-Morality_Main_data-constructed.dta", clear;

*2. Setting Macros;
*2.1. Setting sample restrictions for DD;
*2.1.1. For the FSW Data;
local sw1 = "if sw==1&dataset==1&full==1";
	*still in sex work;
local sw2 = "if panel_v3==1&dataset==1";
	*in the panel and still in sex work;
local sw3 = "if panelsti_sept==1&dataset==1";
	*in the September STI panel.;
local sw4 = "if wspanel==1&dataset==1";

*2.1.2. For the FSW transaction data;
local tsw1 = "if dataset==2&full==1";
local tsw2 = "if panel_f==1 & dataset==2&full==1";

*2.1.3. For the Client Data;
local c1 = "if dataset==3";

*2.1.4. For the Client transaction data;
local tc1 = "if dataset==4";

*2.2. Setting controls;
local char = 
	"divwid unmarried edyrs age children sw_locyrs disc_factor risktol_nodl nodlr ";
local tchar1 = "regular outsider clean handsome old rich";
local tchar2 = "regular";
local cchar = "divwid unmarried edyrs age disc_factor risktol";
local tcchar = "regular clean attractive";
local i = 0;

*With Controls;

**************;
*All Worksites;
**************;

#delimit;

save "$dt/temp.dta", replace;


*;			 
statsby dd_cl =  _b[dd_cl] _se[dd_cl]: areg sept_any dd_cl el if dataset==1, cluster(wsid) abs(wsid);
rename _stat_2 se;
rename dd_cl b;
gen var = "sept_any";

save "$dt/temp1.dta", replace;
*;

use "$dt/temp.dta", clear;
save "$dt/temp.dta", replace;
 
statsby dd_cl =  _b[dd_cl] _se[dd_cl]: areg hlthacc dd_cl el `char' `sw1'& condeasy!=., cluster(wsid) abs(wsid);
rename _stat_2 se;
rename dd_cl b;
gen var = "hlthacc";
append using "$dt/temp1.dta";
save "$dt/temp1.dta", replace;

*;

use "$dt/temp.dta", clear;
save "$dt/temp.dta", replace;

statsby dd_cl =  _b[dd_cl] _se[dd_cl]: areg condeasy dd_cl el `char' `sw1', cluster(wsid) abs(wsid);
rename _stat_2 se;
rename dd_cl b;
gen var = "condeasy";
append using "$dt/temp1.dta";
save "$dt/temp1.dta", replace;


*;

use "$dt/temp.dta", clear;
save "$dt/temp.dta", replace;

statsby dd_cl =  _b[dd_cl] _se[dd_cl]: areg havecondom	dd_cl el `char' `sw1', cluster(wsid) abs(wsid);
rename _stat_2 se;
rename dd_cl b;
gen var = "havecondom";
append using "$dt/temp1.dta";
save "$dt/temp1.dta", replace;

*;

use "$dt/temp.dta", clear;
save "$dt/temp.dta", replace;

statsby dd_cl =  _b[dd_cl] _se[dd_cl]: areg easyask dd_cl el `char' `sw1', cluster(wsid) abs(wsid);
rename _stat_2 se;
rename dd_cl b;
gen var = "easyask";
append using "$dt/temp1.dta";
save "$dt/temp1.dta", replace;

*;

use "$dt/temp.dta", clear;
save "$dt/temp.dta", replace;

statsby dd_cl =  _b[dd_cl] _se[dd_cl]: areg noco1 dd_cl el `tchar1' `tsw1', cluster(ws_wave) abs(fsw_fe);
rename _stat_2 se;
rename dd_cl b;
gen var = "noco1";
append using "$dt/temp1.dta";
save "$dt/temp1.dta", replace;

*;

use "$dt/temp.dta", clear;
save "$dt/temp.dta", replace;

statsby dd_cl =  _b[dd_cl] _se[dd_cl]: areg noco1 dd_cl el `tcchar' `tc1', cluster(ws_wave) abs(cl_fe);
rename _stat_2 se;
rename dd_cl b;
gen var = "noco11";
append using "$dt/temp1.dta";

gen term= "who";
save "$dt/temp1.dta", replace;


*********************;
***Balanced panel****;
*********************;

use "$dt/temp.dta", clear;

*;

statsby dd_cl =  _b[dd_cl] _se[dd_cl]: areg sept_any dd_cl el `sw3', cluster(wsid) abs(wsid);
rename _stat_2 se;
rename dd_cl b;
gen var = "sept_any";
save "$dt/temp2.dta", replace;


*;
use "$dt/temp.dta", clear;
save "$dt/temp.dta", replace;

statsby dd_cl =  _b[dd_cl] _se[dd_cl]: areg hlthacc dd_cl el `char' `sw2' &condeasy!=., cluster(wsid) abs(wsid);
rename _stat_2 se;
rename dd_cl b;
gen var = "hlthacc";
append using "$dt/temp2.dta";
save "$dt/temp2.dta", replace;

*;
use "$dt/temp.dta", clear;
save "$dt/temp.dta", replace;

statsby dd_cl =  _b[dd_cl] _se[dd_cl]: areg condeasy 	dd_cl el `char' `sw2', cluster(wsid) abs(wsid);
rename _stat_2 se;
rename dd_cl b;
gen var = "condeasy";
append using "$dt/temp2.dta";
save "$dt/temp2.dta", replace;

*;
use "$dt/temp.dta", clear;
save "$dt/temp.dta", replace;

statsby dd_cl =  _b[dd_cl] _se[dd_cl]: areg havecondom	dd_cl el `char' `sw2', cluster(wsid) abs(wsid);
rename _stat_2 se;
rename dd_cl b;
gen var = "havecondom";
append using "$dt/temp2.dta";
save "$dt/temp2.dta", replace;

*;
use "$dt/temp.dta", clear;
save "$dt/temp.dta", replace;

statsby dd_cl =  _b[dd_cl] _se[dd_cl]: areg easyask dd_cl el `char' `sw2', cluster(wsid) abs(wsid);
rename _stat_2 se;
rename dd_cl b;
gen var = "easyask";
append using "$dt/temp2.dta";
save "$dt/temp2.dta", replace;

*;
use "$dt/temp.dta", clear;
save "$dt/temp.dta", replace;

statsby dd_cl =  _b[dd_cl] _se[dd_cl]: areg noco1 dd_cl el `tchar1' `tsw2', cluster(ws_wave) abs(fsw_fe);
rename _stat_2 se;
rename dd_cl b;
gen var = "noco1";
append using "$dt/temp2.dta";
save "$dt/temp2.dta", replace;

gen term= "ba";
save "$dt/temp2.dta", replace;

append using "$dt/temp1.dta";
save "$dt/temp2.dta", replace;


#delimit cr
***Vertical movement in the graph: y

use "$dt/temp2.dta" , clear

gen y = _N/30 - ceil(_n/30) + 1
replace y = 50*y
*Test positive
replace y= y + 28 if term=="who" & var=="sept_any"
replace y= y + 26 if term=="ba" & var=="sept_any"
*Health examn:;
replace y= y + 22 if term=="who" & var=="hlthacc"
replace y= y + 20 if term=="ba" & var=="hlthacc"
*Condom acces:;
replace y= y + 16 if term=="who" & var=="condeasy"
replace y= y + 14 if term=="ba" & var=="condeasy"
*Has condom:;
replace y= y + 10 if term=="who" & var=="havecondom"
replace y= y + 8 if term=="ba" & var=="havecondom"
*Easy to ask;
replace y= y + 4 if term=="who" & var=="easyask"
replace y= y + 2 if term=="ba" & var=="easyask"
*No condom used:;
replace y= y - 2 if term=="who" & var=="noco1"
replace y= y - 4 if term=="ba" & var=="noco1"
*No condom used (client data):;
replace y= y - 8 if term=="who" & var=="noco11"


***Horizontal movement in the graph: b
gen b1 = b + 2
expand 2

gen treat="dd_cl"

*Create confidence intervals:
bys var term treat: gen conf = b + (-1)^(_n) * se*1.96
encode treat, g(t)
encode term, g(sa)
encode var, g(v)
levelsof t, l(t)
levelsof sa, l(sa)
levelsof v, l(v)
local intervals ""
local intervals_who ""
local intervals_ba ""

foreach x in `t' {
foreach y in `sa' {
foreach z in `v' {
if (`y'==1) {
local intervals `"`intervals' (li y conf if t == `x' & sa == `y' & v == `z', lc(black) )"'
local intervals_ba `"`intervals_ba' (li y2 conf if t == `x' & sa == `y' & v == `z', lc(black) )"'
}
if (`y'==2) {
local intervals `"`intervals' (li y conf if t == `x' & sa == `y' & v == `z', lc(gs11) )"'
local intervals_who `"`intervals_who' (li y2 conf if t == `x' & sa == `y' & v == `z', lc(gs11))"'
}
}
}
}
*
tw  (sc y b if sa == 1, m(S) mcolor(black))(sc y b if sa == 2, m(O) mcolor(gs11))`intervals', legend(order (2 1) label(2 "In-person Sample") label(1 "In-person Panel Sample")) scheme(s1color) xlab(-1 (0.2) 1) xtitle("") xlabel(-1 "-1.0" -.8 "-0.8" -.6 "-0.6" -.4 "-0.4" -.2 "-0.2" 1 "1.0" .8 "0.8" .6 "0.6" .4 "0.4" .2 "0.2" 0 "0") xline(0, lc(gs8) lpat(dash)) xline(-0.8 -0.6 -0.4 -0.2 0.2 0.4 0.6 0.8, lc(gs15)) yscale (range(10 53)) ylabel(49 "Test Positive"  43 "Health Exam"   37 "Condom Access" 31 "Has Condom" 25 "Easy to ask" 19 "No Condom Used" 13 "No Condom Used" 10.8 "(Client data)", angle(horizontal) noticks) ytitle("") title("Impact of Criminalization on Sex Worker Health" "and Condom Use", size(med))
 

graph export "$dout/Fig_VI_criminalization_impacts.pdf", replace
 
 **********************************************************************************************************************
 *** Figure VII: Baseline STI prevalence, Health Exams and Condom Use Index by Criminalization and Attrition Status ***
 **********************************************************************************************************************

 
 #delimit;


 use "$da/Crimes-Against-Morality_attrition-data.dta", clear;

			
 *making figures.;

 label define attrit_ansamp 0 "Not Attrited" 1 "Attrited";
 label values attrit_ansamp attrit_ansamp;

 preserve;

 ************************;
 ***STI rates Baseline***;
 ************************;
 
 *T-test for equality of means: Not Attrited vs Attrited;

 *Non-criminalized:;
 reg  sept_any1 attrit_ansamp if  closing==0, cluster(wsid);
 *Criminalized:;
 reg  sept_any1 attrit_ansamp if  closing==1, cluster(wsid);


*DD p-value:;
 gen did=attrit_ansamp*closing;

 reg sept_any1 did attrit_ansamp closing, cluster(wsid); 
 boottest  did, reps (100000) bootcluster(wsid);

 cibar sept_any1, over1(attrit_ansamp) over2(closing) ciopts(lcolor(black))bargap(3) 
 graphopts(legend(order(1 "Not Attrited" 2 "Attrited"))  
 ylabel(0 "0" .1 ".1" .2 ".2" .3 ".3" .4 ".4" .5 ".5" .6 ".6" .7 ".7" .8 ".8" .9 ".9" 1 "1", angle(0)) 
 ymlabel(1.1 " " 1.2 " " 1.3 " " 1.4, nolabels tlength(zero))
 ytitle("") xlabel(1.515 "Non-Criminalized" 4.215 "Criminalized") xscale(range(0 5.7))   
 text(1.16 1.4 "{it:p = 0.724}", orientation(horizontal)) 
 text(1.09 1.4 "{subscript:|}{superscript:__________________________}{subscript:|}", 
 orientation(horizontal)) text(.8 4.2 "{it:p = 0.099}", orientation(horizontal)) 
 text(.73 4.2 "{subscript:|}{superscript:__________________________}{subscript:|}", 
 orientation(horizontal)) text(1.35 2.9 "{it:p = 0.146}", orientation(horizontal)) 
 text(1.27 2.9 "{subscript:|}{superscript:____________________________________________________________}{subscript:|}") 
 title("Baseline STI Rates")) barcolor(gs12) baropts(color(gs7) fintensity(inten70));


 graph export "$dout/Fig_VII_baseline_STI.pdf", replace;

 graph export "C:\Users\jseagermuz\Dropbox\Indonesia\Papers\Crimes against Morality\QJE\Acceptance\0_Paper+Appendix2\FigureVII_a.eps", replace;

 ***************************; 
 ***Health exams Baseline***;
 ***************************;  

 *T-test for equality of means: Not Attrited vs Attrited;

 *Non-criminalized:;
 reg hlthacc attrit_ansamp if  closing==0, cluster(wsid);
 *Criminalized:;
 reg hlthacc attrit_ansamp if  closing==1, cluster(wsid);

 *DD p-value:;
 reg hlthacc did attrit_ansamp closing, cluster(wsid);
 boottest  did, reps (100000) bootcluster(wsid);

 *Figure:;
 cibar hlthacc, over1(attrit_ansamp) over2(closing) ciopts(lcolor(black))bargap(3) 
 graphopts(legend(order(1 "Not Attrited" 2 "Attrited")) ylabel(0 "0" .1 ".1" .2 ".2" .3 ".3" .4 ".4" .5 ".5" .6 ".6" .7 ".7" .8 ".8" .9 ".9" 1 "1", angle(0)) 
 ymlabel(1.1 " " 1.2 " " 1.3 " " 1.4, nolabels tlength(zero))
 ytitle("") xlabel(1.515 "Non-Criminalized" 4.215 "Criminalized") xscale(range(0 5.7))   
 text(.92 1.4 "{it:p = 0.178}", orientation(horizontal)) 
 text(.85 1.4 "{subscript:|}{superscript:__________________________}{subscript:|}", orientation(horizontal)) 
 text(1.11 4.2 "{it:p = 0.637}", orientation(horizontal)) 
 text(1.04 4.2 "{subscript:|}{superscript:__________________________}{subscript:|}", orientation(horizontal)) 
 text(1.35 2.9 "{it:p = 0.264}", orientation(horizontal)) 
 text(1.27 2.9 "{subscript:|}{superscript:____________________________________________________________}{subscript:|}", 
 orientation(horizontal)) 
 title("Baseline Health Exam Rates")) barcolor(gs12) baropts(color(gs7) fintensity(inten70));


 graph export "$dout/Fig_VII_baseline_health_exams.pdf", replace;
 graph export "C:\Users\jseagermuz\Dropbox\Indonesia\Papers\Crimes against Morality\QJE\Acceptance\0_Paper+Appendix2\FigureVII_b.eps", replace;

 
 
 ******************;
 ***Condom Index***;
 ******************;

 *T-test for equality of means: Baseline vs Endline;

 *Non-criminalized:;
 reg  cndom_index attrit_ansamp if  closing==0, cluster(wsid);
 *Criminalized:;
 reg  cndom_index attrit_ansamp if  closing==1, cluster(wsid);


 *DD p-value;
 reg cndom_index did attrit_ansamp closing, cluster(wsid);
 boottest  did, reps (100000) bootcluster(wsid);

 *Figure:;
 cibar cndom_index, over1(attrit_ansamp) over2(closing) ciopts(lcolor(black))bargap(3) 
 graphopts(legend(order(1 "Not Attrited" 2 "Attrited")) ylabel(0.1 (0.1) -1, angle(0)) ytitle("") 
 xlabel(1.515 "Non-Criminalized" 4.215 "Criminalized") xscale(range(0 5.7))   
 text(-0.6 1.4 "{it:p = 0.220}", orientation(horizontal)) 
 text(-.55 1.4 "{superscript:|}{superscript:__________________________}{superscript:|}", 
 orientation(horizontal)) text(-.35 4.2 "{it:p = 0.322}", orientation(horizontal)) 
 text(-.3 4.2 "{superscript:|}{superscript:__________________________}{superscript:|}", 
 orientation(horizontal)) text(-0.9 2.9 "{it:p = 0.456}", orientation(horizontal)) 
 text(-0.83 2.9 "{superscript:|}{superscript:____________________________________________________________}{superscript:|}") 
 yline(0, lcolor(gs14))
 title("Baseline Condom Use Index")) barcolor(gs12) baropts(color(gs7) fintensity(inten70));

 graph export "$dout/Fig_VII_baseline_condom_index.pdf", as (pdf) replace;
 graph export "C:\Users\jseagermuz\Dropbox\Indonesia\Papers\Crimes against Morality\QJE\Acceptance\0_Paper+Appendix2\FigureVII_c.eps", replace;

